﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SArena2v2Team extends IMessageBase
    {
        public var teamId:SEntityId;
        public var name:String;
        public var captainId:SEntityId;
        public var captainPlayer:SArenaBasePlayer;
        public var memberId:SEntityId;
        public var memberPlayer:SArenaBasePlayer;
        public var level:int;
        public const _type:int = 7040;
        public static var _regist:SArena2v2Team = new SArena2v2Team(true);

        public function SArena2v2Team(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SArena2v2Team();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.teamId.__write(param1);
            param1.writeString(this.name);
            this.captainId.__write(param1);
            this.captainPlayer.__write(param1);
            this.memberId.__write(param1);
            this.memberPlayer.__write(param1);
            param1.writeInt(this.level);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.teamId = new SEntityId();
            this.teamId.__read(param1);
            this.name = param1.readString();
            this.captainId = new SEntityId();
            this.captainId.__read(param1);
            this.captainPlayer = new SArenaBasePlayer();
            this.captainPlayer.__read(param1);
            this.memberId = new SEntityId();
            this.memberId.__read(param1);
            this.memberPlayer = new SArenaBasePlayer();
            this.memberPlayer.__read(param1);
            this.level = param1.readInt();
            return;
        }// end function

    }
}
